#ifndef _LED_H
#define _LED_H
#include "main.h"

// 右边
#define A                 PBout(0)
#define B                 PBout(2)
#define C                 PBout(11)
#define D                 PBout(13)
#define G1                PBout(15)
#define G2                PBout(4)
#define LAT               PBout(6)
#define CLK               PBout(8)
// 左边
#define OE                PBout(14)
#define R1                PBout(3)
#define R2                PBout(5)

#define LED               PAout(0)
#define DisplayON         OE = 0
#define DisplayOFF        OE = 1
#define Latch             LAT = 1; LAT = 0

// 缓冲区大小,多少个汉字
#define BUF_SIZE 5

// 以下是一些测试函数
void set_current_row(uint8_t row);
void shift_data_to_led(uint8_t row, uint8_t n_bit);
void spread_data_to_display_buf(uint16_t gb2312);
void display_text(uint8_t* text);
void led_init();

#endif // !_LED_H